<template>
    <div>
        <!-- 改签记录 -->
        <div class="container">
            <!-- 表格 -->
            <el-form :inline="true" :model="formList" class="ticketForm" id="changeRecord">
                <el-form-item label="操作时间起">
                    <el-date-picker type="date" size="mini" class="minipt" v-model="formList.startDate" value-format="yyyy-MM-dd HH:mm:ss">

                    </el-date-picker>
                    至
                    <el-date-picker type="date" size="mini" class="minipt" v-model="formList.endDate" value-format="yyyy-MM-dd HH:mm:ss">

                    </el-date-picker>
                </el-form-item> 
                <el-form-item label="票号" class="minipt">
                    <el-input size="mini" v-model="formList.billno" class="inp"></el-input>
                </el-form-item>
                <el-form-item label="条码号">
                    <el-input size="mini" v-model="formList.barcode" class="inp"></el-input>
                </el-form-item>
                <button class="check-btn rf" type="button" @click="QueryList">
                    <img src="../../assets/imgs/operation_btn_icon_chaxun_default.png" alt="" class="btn-img">查询
                </button>
            </el-form>
            <!-- 表单 -->
            <el-table style="width: 100%" :data="tableData">
                <el-table-column prop="billno" label="票号">
                </el-table-column>
                <el-table-column prop="barcode" label="条码" ></el-table-column>
                <el-table-column prop="bus_id_old" label="原班次" ></el-table-column>
                <el-table-column prop="seatno_old" label="原座号" ></el-table-column>
                <el-table-column prop="bus_id_new" label="检入班次" ></el-table-column>
                <el-table-column prop="seatno_new" label="检入座位"></el-table-column>
                <el-table-column prop="oper_no" label="售票员"></el-table-column>
                <el-table-column prop="create_time" label="操作时间" width="120"></el-table-column>
                <el-table-column prop="" label="" width="390"></el-table-column>
            </el-table>
             <!-- 分页 -->
            <div class="pagination">
                 <el-pagination
                    :page-sizes="[100, 200, 300, 400]"
                    :page-size="100"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="400">
                </el-pagination>
            </div>
        </div>
    </div>
</template>
<script>
    import qs from "qs";
export default {
    data() {
        return {
            formList: {
                startDate: "",
                endDate: "",
                billno: "",
                barcode: "",
            },
            tableData: [],
    };
  },
  methods: {
      //查询按钮事件
      QueryList(){
          this.tableData = [];
          var that = this;
          this.$http.post(
              "/query/tks/sp_check/list",qs.stringify({
                  filterRules: '[{"field":"tbcc.type","op":"eq","value":"改签"},' +
                      '{"field":"tbcc.create_time","op":"dge","value":"'+that.formList.startDate+'"},' +
                      '{"field":"tbcc.create_time","op":"dle","value":"'+that.formList.endDate+'"},' +
                      '{"field":"tbc.billno","op":"eq","value":"'+that.formList.billno+'"},' +
                      '{"field":"tbc.barcode","op":"eq","value":"'+that.formList.barcode+'"}]',
                  'page': '1',
                  'rows': '50',
                  'sort': 'create_time',
                  'order': 'desc',
              })
          ).then(
              data=>{
                  for (var a of  data.data.list) {
                      this.tableData.push({
                          billno:a.billno,
                          barcode:a.barcode,
                          bus_id_old:a.bus_id_old,
                          seatno_old:a.seatno_old,
                          bus_id_new:a.bus_id_new,
                          seatno_new:a.seatno_new,
                          create_time:a.create_time,
                          oper_no:a.oper_no,
                      })


                  }

              })

      },



  },
    mounted() {
    }
}
</script>
<style src='../../assets/css/check/changeRecord.css' lang="css">

</style>
